<?php
/**
 * function：部分功能调试接口类.
 * @Author: 倪银龙
 * @Mail niyinlong@126.com
 * @Date: 15-10-1
 * @Time: 上午9:00
 * @Blog: Http://www.thinkwechat.cn
 */
namespace Home\Controller;
use Think\Controller;
use Org\Wechat\response;
use Org\Wechat\api;
use Org\Wechat\message;
use Org\Wechat\accesstoken;
class TestController extends Controller {
	public function index(){  
		$tool = new response();
		dump($tool->text(1,1,1));
		dump($tool->image("fromusername", "tousername", "mediaId"));
		dump($tool->voice("fromusername", "tousername", "mediaId"));
		//($fromusername, $tousername, $mediaId, $title, $description){
		dump($tool->video("fromusername", "tousername", "mediaId","title","description"));
		dump($tool->music("fromusername", "tousername", "title","description","url","hgurl","mediaId"));
		$tuwenList = array();
        $tuwenList[0] = array('title'=>'标题1', 'description'=>'描述1', 'pic_url'=>'图片URL1', 'url'=>'点击跳转URL1');
        $tuwenList[1] = array('title'=>'标题1', 'description'=>'描述1', 'pic_url'=>'图片URL1', 'url'=>'点击跳转URL1');
        dump($tool->news("fromusername", "tousername", $tuwenList));
	}
	public function message(){
		$msg = new message(null);
		$msg->fromUsername = "fromUsername";
		$api = new api($msg);
		dump($api->Text_deal());
	}
   	public function token(){
        $tool = new accesstoken();
		$token = $tool->getAccessToken();
		dump($token);
	}
}
?>